﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Models
{
    public class TaskInfo
    {
        public string Code { get; set; }
        public string Name { get; set; }
        public DateTime StartDate { get; set; }
        public DateTime EndDate { get; set; }
        public string Creator { get; set; }
        public string Remark { get; set; }

        public TaskInfo() { }

        public override string ToString()
        {
            return "Code: " + Code + ",Name: " + Name + ",StartDate: " + StartDate + ",EndDate: " + EndDate + ",Creator: " + Creator + ",Remark: " + Remark;
        }
    }

    public class ExecuteRecord
    {
        public string Code { get; set; }
        public string FunctionName { get; set; }
        public double CostTime { get; set; }
        public string ActionFrom { get; set; }
        public DateTime CreateTime { get; set; }

        public override string ToString()
        {
            return "Code: " + Code + ",FunctionName: " + FunctionName + ",CostTime: " + CostTime + ",ActionFrom: " + ActionFrom + "CreateTime: " + CreateTime;
        }
    }

    public class EventLog
    {
        public int ID { get; set; }
        public string EventID { get; set; }
        public string ActionType { get; set; }
        public DateTime ActionTime { get; set; }
        public string Operator { get; set; }
        public string Remark { get; set; }

        public EventLog() { }

        public EventLog(string id, string eType, string oper, string remark)
        {
            this.EventID = id;
            this.ActionType = eType;
            this.ActionTime = DateTime.Now;
            this.Operator = oper;
            this.Remark = remark;
        }
    }
}
